home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-06-21 | 2.2 KB | 91 lines | [TEXT/R*ch] |
- /*
- ProgressProc_hi
- © Bob Boylan 1996
-
- Revision History
- MacHack 1996 Initial creation
- */
-
- #include "ProgressProc_hi.h"
- #include "O Boy.h"
- #include "OBoy_hi.h"
- #include "AEPrint.h"
- #include "string.h"
- // -----------------------------------------------------------------
- // ctor
- //
- ProgressProc_hi::ProgressProc_hi( OBoy_hi *inHICollector )
- : _HICollector( inHICollector )
- {
- }
-
- // -----------------------------------------------------------------
- // dtor
- //
- ProgressProc_hi::~ProgressProc_hi()
- {}
- // -----------------------------------------------------------------
- // UserCancelled
- //
- Boolean
- ProgressProc_hi::UserCancelled()
- {
- DoEvents();
- return OBoy_hi::_CancelWasIssued;
- }
- // -----------------------------------------------------------------
- // BeginUpdate
- //
- void
- ProgressProc_hi::BeginUpdate()
- {
- StPort thePort( _HICollector->GetWindowP() );
- StPen thePen;
- thePen.Reset();
-
- LDelRow((*(_HICollector->GetListH()))->dataBounds.bottom,0,_HICollector->GetListH());
- }
- // -----------------------------------------------------------------
- // EndUpdate
- //
- void
- ProgressProc_hi::EndUpdate()
- {
- }
-
- // -----------------------------------------------------------------
- // NewSubModel
- //
- void
- ProgressProc_hi::NewSubModel( Clone_ut< AEObj_pd > inAEobj )
- {
- StPort thePort( _HICollector->GetWindowP() );
- StPen thePen;
- thePen.Reset();
-
- string theName = (*inAEobj).GetName();
- Cell theCell = {(*(_HICollector->GetListH()))->dataBounds.bottom,0};
- LAddRow(1,theCell.v, _HICollector->GetListH() );
- LSetCell( theName.c_str(), theName.length(), theCell, _HICollector->GetListH() );
-
- _HICollector->NewSubModel( inAEobj );
- }
- // -----------------------------------------------------------------
- // NewPropertyValue
- //
- void
- ProgressProc_hi::NewPropertyValue( Clone_ut<PropertyValue_pd> inPropertyValue )
- {
- StPort thePort( _HICollector->GetWindowP() );
- StPen thePen;
- thePen.Reset();
-
- _HICollector->NewPropertyValue( inPropertyValue );
- string thePropAsString;
- thePropAsString = (*inPropertyValue)._PropertyName + string(":") + Asstring( *inPropertyValue );
-
- Cell theCell = {(*(_HICollector->GetListH()))->dataBounds.bottom,0};
- LAddRow(1,theCell.v, _HICollector->GetListH() );
- LSetCell( thePropAsString.c_str(), min(100L,(long)thePropAsString.length()), theCell, _HICollector->GetListH() );
- }
-